package com.party.domain;

import java.io.Serializable;
import java.util.Date;
/**
 * 
 * @author Caizhf
 * @date 2017年5月12日下午9:29:40
 * @version v.0.1
 * @email 1115054416@qq.com 
 * 
 * <p>Description: 回复</p>
 *
 */
public class Reply implements Serializable{
	
	private int rid;
	private String reply_content;		//回复内容
	private Date reply_time;			//回复时间
	private User user;					//是谁回复的
	private Topic topic;				//回复的是哪一条帖子
	
	
	public int getRid() {
		return rid;
	}
	public void setRid(int rid) {
		this.rid = rid;
	}
	public String getReply_content() {
		return reply_content;
	}
	public void setReply_content(String reply_content) {
		this.reply_content = reply_content;
	}
	public Date getReply_time() {
		return reply_time;
	}
	public void setReply_time(Date reply_time) {
		this.reply_time = reply_time;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public Topic getTopic() {
		return topic;
	}
	public void setTopic(Topic topic) {
		this.topic = topic;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((reply_content == null) ? 0 : reply_content.hashCode());
		result = prime * result + ((reply_time == null) ? 0 : reply_time.hashCode());
		result = prime * result + rid;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Reply other = (Reply) obj;
		if (reply_content == null) {
			if (other.reply_content != null)
				return false;
		} else if (!reply_content.equals(other.reply_content))
			return false;
		if (reply_time == null) {
			if (other.reply_time != null)
				return false;
		} else if (!reply_time.equals(other.reply_time))
			return false;
		if (rid != other.rid)
			return false;
		return true;
	}
	
}
